home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / nikit / NILoginPanel.h < prev    next >
Text File  |  1992-10-29  |  2KB  |  62 lines

  1. /*
  2.     NILoginPanel.h
  3.     Copyright 1989, NeXT, Inc.
  4.     Responsibility: Lee Tucker
  5. */
  6.  
  7. #import <netinfo/ni.h>
  8. #import <appkit/Panel.h>
  9.  
  10. #define NI_USERTESTMODE 0
  11. #define NI_NETINFOTESTMODE 1
  12.  
  13. @interface NILoginPanel : Panel
  14. {
  15.     id    panel;
  16.     id    userField;
  17.     id    passwordField;
  18.     id  instructionText;
  19.     BOOL validLogin;
  20.     BOOL loginSuccess;
  21.     int    bootMode;
  22.     char currentUser[16];
  23.     char currentPassword[16];
  24.     id    iconButton;
  25.     int    _reservedSpace1;
  26.     int _reservedSpace2;
  27.     int _reservedSpace3;
  28. }
  29.  
  30. + new;    /* Loads the NIB section if not already loaded */
  31. - setIconButton:anObject;
  32.  
  33. - (BOOL)runModal:sender inDomain:(void *) domainID;
  34. /* Runs the login dialog modally with the default user "root" */
  35.  
  36. - (BOOL)runModal:sender inDomain:(void *)domainID withUser:(const char *)userName withInstruction:(const char *)whatWarning allowChange:(BOOL)disableUser;
  37. /* Runs the login dialog modally with the user as specified */
  38.  
  39. - (BOOL)runModalWithValidation:sender inDomain:(void *) domainID withUser:(const char *)userName withInstruction:(const char *)whatWarning allowChange:(BOOL)enableUser;
  40.  
  41. /* Target methods */
  42.  
  43. - ok:sender;    /* Target method of the Login button.  If you override this 
  44.     method be careful, it zero's the password value before it completes! */
  45. - cancel:sender;    /* Target method of the Cancel button */
  46.  
  47. /* Data extraction methods */
  48.  
  49. - (BOOL)isValidLogin:sender;
  50. - (const char *)getPassword:sender;  /* This method only will return the 
  51.     correct password if the method is called during an authenticateUser call 
  52.     to the delegate.  It will return NULL at all other times. */
  53. - (const char *)getUser:sender;
  54.  
  55.  
  56. @end
  57.  
  58. @interface NILoginPanelDelegate: Object
  59. - (BOOL)panel:thePanel authenticateUser:(const char *)username withPassword:(const char *)password inDomain:(const void *)domain;  
  60.  
  61. @end
  62.